package com.example.hoasbackend.model.dto;

import com.example.hoasbackend.model.domain.Indent;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
//import jdk.vm.ci.meta.Local;
import lombok.Data;

import java.time.LocalDateTime;
@Data
public class IndentDetailBO {
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long commentId;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long userId;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long batchId;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long roomtypeId;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long hotelId;
    private String description;

    private Double amount;

    private LocalDateTime checkInTime;

    private LocalDateTime checkOutTime;

    private LocalDateTime indentBatchGenerationTime;

    private String indentState;

    public IndentDetailBO(Indent indent){
       this.id=indent.getId();
       this.commentId=indent.getCommentId();
       this.userId=indent.getUserId();
       this.batchId=indent.getBatchId();
       this.roomtypeId=indent.getRoomtypeId();
       this.description=indent.getDescription();
       this.amount=indent.getAmount();
       this.hotelId=indent.getHotelId();

    }
    public IndentDetailBO(Indent indent
            , String state, LocalDateTime indentBatchGenerationTime, LocalDateTime checkInTime,LocalDateTime checkOutTime){
        this.id=indent.getId();
        this.commentId=indent.getCommentId();
        this.userId=indent.getUserId();
        this.batchId=indent.getBatchId();
        this.roomtypeId=indent.getRoomtypeId();
        this.description=indent.getDescription();
        this.amount=indent.getAmount();
        this.hotelId=indent.getHotelId();
        this.indentState=state;
        this.checkInTime=checkInTime;
        this.checkOutTime=checkOutTime;
        this.indentBatchGenerationTime=indentBatchGenerationTime;

    }
}
